home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10237 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: interramp.com!usenet
  2. From: us011245@interramp.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP! Compile Error!
  5. Date: Tue, 05 Mar 96 14:16:07 PDT
  6. Organization: PSI Public Usenet Link
  7. Message-ID: <NEWTNews.12980.826064244.hampton@interramp.com>
  8. References: <4hi7vc$ggd@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: ip185.herndon7.va.interramp.com
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=US-ASCII
  12. X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
  13.  
  14.  
  15. In article <4hi7vc$ggd@newsbf02.news.aol.com>, <mrbig0233@aol.com> writes:
  16. > I am an 11-year-old (yes, no typo) programmer, and I am trying to write a
  17. > sorting program for a merit badge. I compile the program, and the error
  18. > is:
  19. > SORT.CPP 7: Declaration terminated incorrectly
  20. > This is the code:
  21. > #include<conio.h>
  22. > #include<stdio.h>
  23. > #include<stdlib.h>
  24. > #include<time.h>
  25. > #include<string.h>
  26. > {
  27. >     main()
  28. >     randomize(num1);
  29. >     randomize(num2);
  30. >     randomize(num3);
  31. >     randomize(num4);
  32. >     randomize(num5);
  33. >     if (strcmp(num1==<num2))
  34. >     {
  35. >         strcpy(num2,num1);
  36. >     }
  37. >     if (strcmp(num2==<num3))
  38. >     {
  39. >         strcpy(num3,num2);
  40. >     }
  41. >     if (strcmp(num3==<num4))
  42. >     {
  43. >         strcpy(num4,num3);
  44. >     }
  45. >     if (strcmp(num4==<num5))
  46. >     {
  47. >         strcpy(num5,num4);
  48. >     }
  49. >     printf("The numbers, in some order:\n");
  50. >     printf("%d, %d, %d, %d, %d",num1,num2,num3,num4,num5);
  51. >     return;
  52. > }
  53. >     
  54. > Please reply to this message! I NEED AN ANSWER!
  55. > Please, in your answer, also tell me how to fix it.
  56. > E-Mail:
  57. > MrBig0233@aol.com
  58.  
  59. MrBig,
  60. Your calls to strcmp look a little strange, why don't you start there.
  61. Luther Hampton
  62.  
  63.